Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DummyBox #1120

Merged
merged 28 commits into from
Nov 14, 2023
Merged

Add DummyBox #1120

merged 28 commits into from
Nov 14, 2023

Conversation

cqc-alec
Copy link
Collaborator

No description provided.

@cqc-alec cqc-alec changed the title Feature/resourceboxes Add DummyBox Nov 13, 2023
@cqc-alec cqc-alec marked this pull request as ready for review November 13, 2023 12:24
Copy link
Contributor

@yao-cqc yao-cqc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only a few minor comments

"required": [
"n_qubits",
"n_bits",
"resource_data"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might also need to define resource_data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sure how to do this. It's a fairly complex structure and I can't find any other examples of serialized objects containing "dictionaries" that I can use as a model. Do you know? (And should we have a test that checks the schema is complete?)

op_type_count = resource_data1.get_op_type_count()
assert op_type_count[OpType.T].get_min() == 10
assert op_type_count[OpType.T].get_max() == 20

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also call json_validate on c?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

} else {
data.GateDepth = {1};
data.OpTypeDepth[optype] = {1};
if (OpDesc(optype).n_qubits() == 2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should we treat types with dynamic n_qubits? e.g. CnRy, boxes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to check for actual number of qubits.

@cqc-alec cqc-alec merged commit 73b44bb into develop Nov 14, 2023
30 checks passed
@cqc-alec cqc-alec deleted the feature/resourceboxes branch November 14, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants